<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Cheetah Software: rt_interface_lcm.h File Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../navtreedata.js"></script>
<script type="text/javascript" src="../../navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Cheetah Software
   &#160;<span id="projectnumber">1.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="../../index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="../../namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="../../annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="../../files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="../../search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="../../search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="../../files.html"><span>File&#160;List</span></a></li>
      <li><a href="../../globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('d4/dd2/rt__interface__lcm_8h.html','../../');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">rt_interface_lcm.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;lcm/lcm-cpp.hpp&gt;</code><br />
</div><div class="textblock"><div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="../../closed.png" alt="+"/> Include dependency graph for rt_interface_lcm.h:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center"><img src="../../da/d3c/rt__interface__lcm_8h__incl.png" border="0" usemap="#rt__interface__lcm_8h" alt=""/></div>
<map name="rt__interface__lcm_8h" id="rt__interface__lcm_8h">
</map>
</div>
</div><div class="textblock"><div id="dynsection-1" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-1-trigger" src="../../closed.png" alt="+"/> This graph shows which files directly or indirectly include this file:</div>
<div id="dynsection-1-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-1-content" class="dyncontent" style="display:none;">
<div class="center"><img src="../../da/d97/rt__interface__lcm_8h__dep__incl.png" border="0" usemap="#rt__interface__lcm_8hdep" alt=""/></div>
<map name="rt__interface__lcm_8hdep" id="rt__interface__lcm_8hdep">
</map>
</div>
</div>
<p><a href="../../d4/dd2/rt__interface__lcm_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d01/class_handler.html">Handler</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a3f348fdbac738fe554e4543dee262081"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/dd2/rt__interface__lcm_8h.html#a3f348fdbac738fe554e4543dee262081">sbus_packet_complete</a> ()</td></tr>
<tr class="memdesc:a3f348fdbac738fe554e4543dee262081"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function which handles the completion of an SBUS Packet and overrides the LCM control settings as desired.  <a href="#a3f348fdbac738fe554e4543dee262081">More...</a><br /></td></tr>
<tr class="separator:a3f348fdbac738fe554e4543dee262081"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a23e01b5e8251dbbb1d21f2ab27a5031b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/dd2/rt__interface__lcm_8h.html#a23e01b5e8251dbbb1d21f2ab27a5031b">get_main_control_settings</a> (void *settings)</td></tr>
<tr class="separator:a23e01b5e8251dbbb1d21f2ab27a5031b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a552c1839ba79498765058c69b3556a49"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/dd2/rt__interface__lcm_8h.html#a552c1839ba79498765058c69b3556a49">get_iterations_since_last_lcm</a> ()</td></tr>
<tr class="memdesc:a552c1839ba79498765058c69b3556a49"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the iterations since the last lcm.  <a href="#a552c1839ba79498765058c69b3556a49">More...</a><br /></td></tr>
<tr class="separator:a552c1839ba79498765058c69b3556a49"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a14e98af13e7121b02719cbc7195dea82"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/dd2/rt__interface__lcm_8h.html#a14e98af13e7121b02719cbc7195dea82">get_rc_channels</a> (void *settings)</td></tr>
<tr class="separator:a14e98af13e7121b02719cbc7195dea82"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a23857b25ac0abcaea372b7fd3cedc04d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/dd2/rt__interface__lcm_8h.html#a23857b25ac0abcaea372b7fd3cedc04d">init_interface_lcm</a> (lcm::LCM *main_lcm)</td></tr>
<tr class="memdesc:a23857b25ac0abcaea372b7fd3cedc04d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializer for all handlers related to the interface LCM streams.  <a href="#a23857b25ac0abcaea372b7fd3cedc04d">More...</a><br /></td></tr>
<tr class="separator:a23857b25ac0abcaea372b7fd3cedc04d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a81c3c7997bc89e85420b385e175f6bef"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/dd2/rt__interface__lcm_8h.html#a81c3c7997bc89e85420b385e175f6bef">control_iteration_lcm</a> ()</td></tr>
<tr class="memdesc:a81c3c7997bc89e85420b385e175f6bef"><td class="mdescLeft">&#160;</td><td class="mdescRight">Increments the number of control iterations since the last LCM packet.  <a href="#a81c3c7997bc89e85420b385e175f6bef">More...</a><br /></td></tr>
<tr class="separator:a81c3c7997bc89e85420b385e175f6bef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa5f4c06b7720f635aed7bf1462fa4465"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/dd2/rt__interface__lcm_8h.html#aa5f4c06b7720f635aed7bf1462fa4465">v_memcpy</a> (void *dest, volatile void *src, size_t n)</td></tr>
<tr class="separator:aa5f4c06b7720f635aed7bf1462fa4465"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a81c3c7997bc89e85420b385e175f6bef"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void control_iteration_lcm </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Increments the number of control iterations since the last LCM packet. </p>

<p>Definition at line <a class="el" href="../../dd/df1/rt__interface__lcm_8cpp_source.html#l00018">18</a> of file <a class="el" href="../../dd/df1/rt__interface__lcm_8cpp_source.html">rt_interface_lcm.cpp</a>.</p>

<p>References <a class="el" href="../../dd/df1/rt__interface__lcm_8cpp_source.html#l00012">iterations_since_last_lcm</a>.</p>
<div class="fragment"><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;{ <a class="code" href="../../dd/df1/rt__interface__lcm_8cpp.html#a75fdd6c290f5f8a1506d49ceec06682d">iterations_since_last_lcm</a>++; }</div><div class="ttc" id="rt__interface__lcm_8cpp_html_a75fdd6c290f5f8a1506d49ceec06682d"><div class="ttname"><a href="../../dd/df1/rt__interface__lcm_8cpp.html#a75fdd6c290f5f8a1506d49ceec06682d">iterations_since_last_lcm</a></div><div class="ttdeci">int iterations_since_last_lcm</div><div class="ttdef"><b>Definition:</b> <a href="../../dd/df1/rt__interface__lcm_8cpp_source.html#l00012">rt_interface_lcm.cpp:12</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a552c1839ba79498765058c69b3556a49"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int get_iterations_since_last_lcm </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Gets the iterations since the last lcm. </p>
<dl class="section return"><dt>Returns</dt><dd>The iterations since last lcm. </dd></dl>

<p>Definition at line <a class="el" href="../../dd/df1/rt__interface__lcm_8cpp_source.html#l00025">25</a> of file <a class="el" href="../../dd/df1/rt__interface__lcm_8cpp_source.html">rt_interface_lcm.cpp</a>.</p>

<p>References <a class="el" href="../../dd/df1/rt__interface__lcm_8cpp_source.html#l00012">iterations_since_last_lcm</a>.</p>
<div class="fragment"><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;{ <span class="keywordflow">return</span> <a class="code" href="../../dd/df1/rt__interface__lcm_8cpp.html#a75fdd6c290f5f8a1506d49ceec06682d">iterations_since_last_lcm</a>; }</div><div class="ttc" id="rt__interface__lcm_8cpp_html_a75fdd6c290f5f8a1506d49ceec06682d"><div class="ttname"><a href="../../dd/df1/rt__interface__lcm_8cpp.html#a75fdd6c290f5f8a1506d49ceec06682d">iterations_since_last_lcm</a></div><div class="ttdeci">int iterations_since_last_lcm</div><div class="ttdef"><b>Definition:</b> <a href="../../dd/df1/rt__interface__lcm_8cpp_source.html#l00012">rt_interface_lcm.cpp:12</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a23e01b5e8251dbbb1d21f2ab27a5031b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void get_main_control_settings </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>settings</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="../../dd/df1/rt__interface__lcm_8cpp_source.html#l00062">62</a> of file <a class="el" href="../../dd/df1/rt__interface__lcm_8cpp_source.html">rt_interface_lcm.cpp</a>.</p>

<p>References <a class="el" href="../../dd/df1/rt__interface__lcm_8cpp_source.html#l00008">lcm_get_set_mutex</a>, <a class="el" href="../../dd/df1/rt__interface__lcm_8cpp_source.html#l00030">main_control_settings</a>, and <a class="el" href="../../dd/df1/rt__interface__lcm_8cpp_source.html#l00191">v_memcpy()</a>.</p>
<div class="fragment"><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;                                               {</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;  pthread_mutex_lock(&amp;<a class="code" href="../../dd/df1/rt__interface__lcm_8cpp.html#a8303863c7983ff8c60f23de0d0265d51">lcm_get_set_mutex</a>);</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;  <a class="code" href="../../dd/df1/rt__interface__lcm_8cpp.html#aa5f4c06b7720f635aed7bf1462fa4465">v_memcpy</a>(settings, &amp;<a class="code" href="../../dd/df1/rt__interface__lcm_8cpp.html#a88fa377ae01a8f76015305fd22a4d3f0">main_control_settings</a>, <span class="keyword">sizeof</span>(<a class="code" href="../../dd/df1/rt__interface__lcm_8cpp.html#a88fa377ae01a8f76015305fd22a4d3f0">main_control_settings</a>));</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;  pthread_mutex_unlock(&amp;<a class="code" href="../../dd/df1/rt__interface__lcm_8cpp.html#a8303863c7983ff8c60f23de0d0265d51">lcm_get_set_mutex</a>);</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;}</div><div class="ttc" id="rt__interface__lcm_8cpp_html_aa5f4c06b7720f635aed7bf1462fa4465"><div class="ttname"><a href="../../dd/df1/rt__interface__lcm_8cpp.html#aa5f4c06b7720f635aed7bf1462fa4465">v_memcpy</a></div><div class="ttdeci">void * v_memcpy(void *dest, volatile void *src, size_t n)</div><div class="ttdef"><b>Definition:</b> <a href="../../dd/df1/rt__interface__lcm_8cpp_source.html#l00191">rt_interface_lcm.cpp:191</a></div></div>
<div class="ttc" id="rt__interface__lcm_8cpp_html_a8303863c7983ff8c60f23de0d0265d51"><div class="ttname"><a href="../../dd/df1/rt__interface__lcm_8cpp.html#a8303863c7983ff8c60f23de0d0265d51">lcm_get_set_mutex</a></div><div class="ttdeci">static pthread_mutex_t lcm_get_set_mutex</div><div class="ttdef"><b>Definition:</b> <a href="../../dd/df1/rt__interface__lcm_8cpp_source.html#l00008">rt_interface_lcm.cpp:8</a></div></div>
<div class="ttc" id="rt__interface__lcm_8cpp_html_a88fa377ae01a8f76015305fd22a4d3f0"><div class="ttname"><a href="../../dd/df1/rt__interface__lcm_8cpp.html#a88fa377ae01a8f76015305fd22a4d3f0">main_control_settings</a></div><div class="ttdeci">gui_main_control_settings_t main_control_settings</div><div class="ttdef"><b>Definition:</b> <a href="../../dd/df1/rt__interface__lcm_8cpp_source.html#l00030">rt_interface_lcm.cpp:30</a></div></div>
</div><!-- fragment -->
<p><div id="dynsection-2" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-2-trigger" src="../../closed.png" alt="+"/> Here is the call graph for this function:</div>
<div id="dynsection-2-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-2-content" class="dyncontent" style="display:none;">
<div class="center"><img src="../../d4/dd2/rt__interface__lcm_8h_a23e01b5e8251dbbb1d21f2ab27a5031b_cgraph.png" border="0" usemap="#d4/dd2/rt__interface__lcm_8h_a23e01b5e8251dbbb1d21f2ab27a5031b_cgraph" alt=""/></div>
<map name="d4/dd2/rt__interface__lcm_8h_a23e01b5e8251dbbb1d21f2ab27a5031b_cgraph" id="d4/dd2/rt__interface__lcm_8h_a23e01b5e8251dbbb1d21f2ab27a5031b_cgraph">
</map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a14e98af13e7121b02719cbc7195dea82"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void get_rc_channels </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>settings</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="../../dd/df1/rt__interface__lcm_8cpp_source.html#l00068">68</a> of file <a class="el" href="../../dd/df1/rt__interface__lcm_8cpp_source.html">rt_interface_lcm.cpp</a>.</p>

<p>References <a class="el" href="../../dd/df1/rt__interface__lcm_8cpp_source.html#l00008">lcm_get_set_mutex</a>, <a class="el" href="../../dd/df1/rt__interface__lcm_8cpp_source.html#l00034">rc_channels</a>, and <a class="el" href="../../dd/df1/rt__interface__lcm_8cpp_source.html#l00191">v_memcpy()</a>.</p>
<div class="fragment"><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;                                     {</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;  pthread_mutex_lock(&amp;<a class="code" href="../../dd/df1/rt__interface__lcm_8cpp.html#a8303863c7983ff8c60f23de0d0265d51">lcm_get_set_mutex</a>);</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;  <a class="code" href="../../dd/df1/rt__interface__lcm_8cpp.html#aa5f4c06b7720f635aed7bf1462fa4465">v_memcpy</a>(settings, &amp;<a class="code" href="../../dd/df1/rt__interface__lcm_8cpp.html#aa0a50d701c6abf61123433597908a249">rc_channels</a>, <span class="keyword">sizeof</span>(<a class="code" href="../../dd/df1/rt__interface__lcm_8cpp.html#aa0a50d701c6abf61123433597908a249">rc_channels</a>));</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;  pthread_mutex_unlock(&amp;<a class="code" href="../../dd/df1/rt__interface__lcm_8cpp.html#a8303863c7983ff8c60f23de0d0265d51">lcm_get_set_mutex</a>);</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;}</div><div class="ttc" id="rt__interface__lcm_8cpp_html_aa5f4c06b7720f635aed7bf1462fa4465"><div class="ttname"><a href="../../dd/df1/rt__interface__lcm_8cpp.html#aa5f4c06b7720f635aed7bf1462fa4465">v_memcpy</a></div><div class="ttdeci">void * v_memcpy(void *dest, volatile void *src, size_t n)</div><div class="ttdef"><b>Definition:</b> <a href="../../dd/df1/rt__interface__lcm_8cpp_source.html#l00191">rt_interface_lcm.cpp:191</a></div></div>
<div class="ttc" id="rt__interface__lcm_8cpp_html_aa0a50d701c6abf61123433597908a249"><div class="ttname"><a href="../../dd/df1/rt__interface__lcm_8cpp.html#aa0a50d701c6abf61123433597908a249">rc_channels</a></div><div class="ttdeci">rc_channels_t rc_channels</div><div class="ttdef"><b>Definition:</b> <a href="../../dd/df1/rt__interface__lcm_8cpp_source.html#l00034">rt_interface_lcm.cpp:34</a></div></div>
<div class="ttc" id="rt__interface__lcm_8cpp_html_a8303863c7983ff8c60f23de0d0265d51"><div class="ttname"><a href="../../dd/df1/rt__interface__lcm_8cpp.html#a8303863c7983ff8c60f23de0d0265d51">lcm_get_set_mutex</a></div><div class="ttdeci">static pthread_mutex_t lcm_get_set_mutex</div><div class="ttdef"><b>Definition:</b> <a href="../../dd/df1/rt__interface__lcm_8cpp_source.html#l00008">rt_interface_lcm.cpp:8</a></div></div>
</div><!-- fragment -->
<p><div id="dynsection-3" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-3-trigger" src="../../closed.png" alt="+"/> Here is the call graph for this function:</div>
<div id="dynsection-3-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-3-content" class="dyncontent" style="display:none;">
<div class="center"><img src="../../d4/dd2/rt__interface__lcm_8h_a14e98af13e7121b02719cbc7195dea82_cgraph.png" border="0" usemap="#d4/dd2/rt__interface__lcm_8h_a14e98af13e7121b02719cbc7195dea82_cgraph" alt=""/></div>
<map name="d4/dd2/rt__interface__lcm_8h_a14e98af13e7121b02719cbc7195dea82_cgraph" id="d4/dd2/rt__interface__lcm_8h_a14e98af13e7121b02719cbc7195dea82_cgraph">
</map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a23857b25ac0abcaea372b7fd3cedc04d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void init_interface_lcm </td>
          <td>(</td>
          <td class="paramtype">lcm::LCM *&#160;</td>
          <td class="paramname"><em>main_lcm</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initializer for all handlers related to the interface LCM streams. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">main_lcm</td><td>A pointer to the main lcm object used in the lcm thread </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="../../dd/df1/rt__interface__lcm_8cpp_source.html#l00172">172</a> of file <a class="el" href="../../dd/df1/rt__interface__lcm_8cpp_source.html">rt_interface_lcm.cpp</a>.</p>

<p>References <a class="el" href="../../dd/df1/rt__interface__lcm_8cpp_source.html#l00004">g_lcm</a>, <a class="el" href="../../dd/df1/rt__interface__lcm_8cpp_source.html#l00030">main_control_settings</a>, <a class="el" href="../../dd/df1/rt__interface__lcm_8cpp_source.html#l00040">Handler::main_control_settings_handler()</a>, and <a class="el" href="../../dd/df1/rt__interface__lcm_8cpp_source.html#l00052">Handler::rc_channels_handler()</a>.</p>
<div class="fragment"><div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;                                          {</div><div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;  printf(<span class="stringliteral">&quot;[RT Interface LCM] Initializing...\n&quot;</span>);</div><div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;  <a class="code" href="../../dd/df1/rt__interface__lcm_8cpp.html#acbf5bef97a2872232afca72d4cf18393">g_lcm</a> = main_lcm;</div><div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;</div><div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;  <a class="code" href="../../d2/d01/class_handler.html">Handler</a> handlerObj;</div><div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;</div><div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;  <a class="code" href="../../dd/df1/rt__interface__lcm_8cpp.html#acbf5bef97a2872232afca72d4cf18393">g_lcm</a>-&gt;subscribe(<span class="stringliteral">&quot;INTERFACE_gui_main_control_settings&quot;</span>,</div><div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;                   &amp;<a class="code" href="../../d2/d01/class_handler.html#a859908bca1e073bc2a874c89641a1cd5">Handler::main_control_settings_handler</a>, &amp;handlerObj);</div><div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;  <a class="code" href="../../dd/df1/rt__interface__lcm_8cpp.html#acbf5bef97a2872232afca72d4cf18393">g_lcm</a>-&gt;subscribe(<span class="stringliteral">&quot;INTERFACE_rc_channels&quot;</span>, &amp;<a class="code" href="../../d2/d01/class_handler.html#a3dbe093443dd23a6f69e46548452b4cf">Handler::rc_channels_handler</a>,</div><div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;                   &amp;handlerObj);</div><div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;</div><div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;  <a class="code" href="../../dd/df1/rt__interface__lcm_8cpp.html#a88fa377ae01a8f76015305fd22a4d3f0">main_control_settings</a>.enable = 1;</div><div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;</div><div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;  printf(<span class="stringliteral">&quot;[RT Interface LCM] Done\n&quot;</span>);</div><div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;</div><div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;  <span class="comment">// printf(&quot;Initial PFOOT SETTINGS %lf\n&quot;,</span></div><div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;  <span class="comment">// state_estimator_settings.process_noise_pfoot);</span></div><div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;}</div><div class="ttc" id="class_handler_html_a859908bca1e073bc2a874c89641a1cd5"><div class="ttname"><a href="../../d2/d01/class_handler.html#a859908bca1e073bc2a874c89641a1cd5">Handler::main_control_settings_handler</a></div><div class="ttdeci">void main_control_settings_handler(const lcm::ReceiveBuffer *rbuf, const std::string &amp;channel, const gui_main_control_settings_t *msg)</div><div class="ttdoc">Handler for main control settings from MATLAB interface. Never call this yourself, leave it to LCM. </div><div class="ttdef"><b>Definition:</b> <a href="../../dd/df1/rt__interface__lcm_8cpp_source.html#l00040">rt_interface_lcm.cpp:40</a></div></div>
<div class="ttc" id="rt__interface__lcm_8cpp_html_acbf5bef97a2872232afca72d4cf18393"><div class="ttname"><a href="../../dd/df1/rt__interface__lcm_8cpp.html#acbf5bef97a2872232afca72d4cf18393">g_lcm</a></div><div class="ttdeci">static lcm::LCM * g_lcm</div><div class="ttdef"><b>Definition:</b> <a href="../../dd/df1/rt__interface__lcm_8cpp_source.html#l00004">rt_interface_lcm.cpp:4</a></div></div>
<div class="ttc" id="class_handler_html"><div class="ttname"><a href="../../d2/d01/class_handler.html">Handler</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d4/dd2/rt__interface__lcm_8h_source.html#l00013">rt_interface_lcm.h:13</a></div></div>
<div class="ttc" id="class_handler_html_a3dbe093443dd23a6f69e46548452b4cf"><div class="ttname"><a href="../../d2/d01/class_handler.html#a3dbe093443dd23a6f69e46548452b4cf">Handler::rc_channels_handler</a></div><div class="ttdeci">void rc_channels_handler(const lcm::ReceiveBuffer *rbuf, const std::string &amp;channel, const rc_channels_t *msg)</div><div class="ttdef"><b>Definition:</b> <a href="../../dd/df1/rt__interface__lcm_8cpp_source.html#l00052">rt_interface_lcm.cpp:52</a></div></div>
<div class="ttc" id="rt__interface__lcm_8cpp_html_a88fa377ae01a8f76015305fd22a4d3f0"><div class="ttname"><a href="../../dd/df1/rt__interface__lcm_8cpp.html#a88fa377ae01a8f76015305fd22a4d3f0">main_control_settings</a></div><div class="ttdeci">gui_main_control_settings_t main_control_settings</div><div class="ttdef"><b>Definition:</b> <a href="../../dd/df1/rt__interface__lcm_8cpp_source.html#l00030">rt_interface_lcm.cpp:30</a></div></div>
</div><!-- fragment -->
<p><div id="dynsection-4" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-4-trigger" src="../../closed.png" alt="+"/> Here is the call graph for this function:</div>
<div id="dynsection-4-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-4-content" class="dyncontent" style="display:none;">
<div class="center"><img src="../../d4/dd2/rt__interface__lcm_8h_a23857b25ac0abcaea372b7fd3cedc04d_cgraph.png" border="0" usemap="#d4/dd2/rt__interface__lcm_8h_a23857b25ac0abcaea372b7fd3cedc04d_cgraph" alt=""/></div>
<map name="d4/dd2/rt__interface__lcm_8h_a23857b25ac0abcaea372b7fd3cedc04d_cgraph" id="d4/dd2/rt__interface__lcm_8h_a23857b25ac0abcaea372b7fd3cedc04d_cgraph">
</map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a3f348fdbac738fe554e4543dee262081"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void sbus_packet_complete </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Function which handles the completion of an SBUS Packet and overrides the LCM control settings as desired. </p>

<p>Definition at line <a class="el" href="../../dd/df1/rt__interface__lcm_8cpp_source.html#l00078">78</a> of file <a class="el" href="../../dd/df1/rt__interface__lcm_8cpp_source.html">rt_interface_lcm.cpp</a>.</p>

<p>References <a class="el" href="../../dc/dd7/test__casadi_8cpp_source.html#l00202">f()</a>, <a class="el" href="../../dd/df1/rt__interface__lcm_8cpp_source.html#l00008">lcm_get_set_mutex</a>, <a class="el" href="../../dd/df1/rt__interface__lcm_8cpp_source.html#l00030">main_control_settings</a>, and <a class="el" href="../../d2/dad/rt__sbus_8cpp_source.html#l00101">read_sbus_channel()</a>.</p>
<div class="fragment"><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;                            {</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;  pthread_mutex_lock(&amp;<a class="code" href="../../dd/df1/rt__interface__lcm_8cpp.html#a8303863c7983ff8c60f23de0d0265d51">lcm_get_set_mutex</a>);</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;</div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;  <span class="keywordtype">int</span> ch1 = <a class="code" href="../../d1/d95/rt__sbus_8h.html#a556abff30497289e33d971c6069c455c">read_sbus_channel</a>(0);</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;  <span class="keywordtype">int</span> ch2 = <a class="code" href="../../d1/d95/rt__sbus_8h.html#a556abff30497289e33d971c6069c455c">read_sbus_channel</a>(1);</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;  <span class="keywordtype">int</span> ch3 = <a class="code" href="../../d1/d95/rt__sbus_8h.html#a556abff30497289e33d971c6069c455c">read_sbus_channel</a>(2);</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;  <span class="keywordtype">int</span> ch4 = <a class="code" href="../../d1/d95/rt__sbus_8h.html#a556abff30497289e33d971c6069c455c">read_sbus_channel</a>(3);</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;  <span class="keywordtype">int</span> ch7 = <a class="code" href="../../d1/d95/rt__sbus_8h.html#a556abff30497289e33d971c6069c455c">read_sbus_channel</a>(6);</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;  <span class="keywordtype">int</span> ch9 = <a class="code" href="../../d1/d95/rt__sbus_8h.html#a556abff30497289e33d971c6069c455c">read_sbus_channel</a>(8);</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;  <span class="keywordtype">int</span> ch10 = <a class="code" href="../../d1/d95/rt__sbus_8h.html#a556abff30497289e33d971c6069c455c">read_sbus_channel</a>(9);</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;  <span class="keywordtype">int</span> ch11 = <a class="code" href="../../d1/d95/rt__sbus_8h.html#a556abff30497289e33d971c6069c455c">read_sbus_channel</a>(10);</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;  <span class="keywordtype">int</span> ch13 = <a class="code" href="../../d1/d95/rt__sbus_8h.html#a556abff30497289e33d971c6069c455c">read_sbus_channel</a>(12);</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;  <span class="comment">// velocity scales between 1.0 and 3.0</span></div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;  <span class="keywordtype">float</span> v_scale = 2.0f * (((float)(ch7 - 172)) / 1811.0<a class="code" href="../../dc/dd7/test__casadi_8cpp.html#ae20d7fba59865a21504b65cdb44cbfe5">f</a>) + 1.0f;</div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;  <span class="comment">// Ignore commands if switched</span></div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;  <span class="keywordflow">if</span> (ch11 != 1811) {</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;    <span class="comment">// oh shit switch</span></div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;    <span class="keywordflow">if</span> (ch10 == 172) {</div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;      <a class="code" href="../../dd/df1/rt__interface__lcm_8cpp.html#a88fa377ae01a8f76015305fd22a4d3f0">main_control_settings</a>.mode = 0;</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;    } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (ch10 == 992) {</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;      <a class="code" href="../../dd/df1/rt__interface__lcm_8cpp.html#a88fa377ae01a8f76015305fd22a4d3f0">main_control_settings</a>.mode = 12;</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;    } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (ch10 == 1811) {</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;      <a class="code" href="../../dd/df1/rt__interface__lcm_8cpp.html#a88fa377ae01a8f76015305fd22a4d3f0">main_control_settings</a>.mode = 11;</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;    }</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;</div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;    <span class="comment">// Use the joysticks for velocity and yaw control in locomotion gaits</span></div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="../../dd/df1/rt__interface__lcm_8cpp.html#a88fa377ae01a8f76015305fd22a4d3f0">main_control_settings</a>.mode == 11) {</div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;      <span class="comment">// Analog channels return a value between ~200 and 1800, with sticks</span></div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;      <span class="comment">// centered at 1000</span></div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;</div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;      <span class="keywordflow">if</span> (ch9 == 1811) {</div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;        <a class="code" href="../../dd/df1/rt__interface__lcm_8cpp.html#a88fa377ae01a8f76015305fd22a4d3f0">main_control_settings</a>.variable[0] = 4;</div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;      }  <span class="comment">// Stand</span></div><div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;      <span class="keywordflow">else</span> <span class="keywordflow">if</span> (ch9 == 992) {</div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;        <a class="code" href="../../dd/df1/rt__interface__lcm_8cpp.html#a88fa377ae01a8f76015305fd22a4d3f0">main_control_settings</a>.variable[0] = 0;</div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;      }  <span class="comment">// Trot</span></div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;      <span class="keywordflow">else</span> <span class="keywordflow">if</span> ((ch9 == 172) &amp;&amp; (ch13 == 1811)) {</div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;        <a class="code" href="../../dd/df1/rt__interface__lcm_8cpp.html#a88fa377ae01a8f76015305fd22a4d3f0">main_control_settings</a>.variable[0] = 5;</div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;      }  <span class="comment">// Trot run</span></div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;      <span class="keywordflow">else</span> <span class="keywordflow">if</span> ((ch9 == 172) &amp;&amp; (ch13 == 992)) {</div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;        <a class="code" href="../../dd/df1/rt__interface__lcm_8cpp.html#a88fa377ae01a8f76015305fd22a4d3f0">main_control_settings</a>.variable[0] = 2;</div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;      }  <span class="comment">// Pronk</span></div><div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;      <span class="keywordflow">else</span> <span class="keywordflow">if</span> ((ch9 == 172) &amp;&amp; (ch13 == 172)) {</div><div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;        <a class="code" href="../../dd/df1/rt__interface__lcm_8cpp.html#a88fa377ae01a8f76015305fd22a4d3f0">main_control_settings</a>.variable[0] = 1;</div><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;      }  <span class="comment">// Bound</span></div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;</div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;      <span class="comment">// If using the stand gait, control orientations</span></div><div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;      <span class="keywordflow">if</span> (<a class="code" href="../../dd/df1/rt__interface__lcm_8cpp.html#a88fa377ae01a8f76015305fd22a4d3f0">main_control_settings</a>.variable[0] == 4) {</div><div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;        <a class="code" href="../../dd/df1/rt__interface__lcm_8cpp.html#a88fa377ae01a8f76015305fd22a4d3f0">main_control_settings</a>.rpy_des[0] = ((float)ch4 - 1000) * .0003f;</div><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;        <a class="code" href="../../dd/df1/rt__interface__lcm_8cpp.html#a88fa377ae01a8f76015305fd22a4d3f0">main_control_settings</a>.rpy_des[1] = ((float)ch3 - 1000) * .0005f;</div><div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;        <a class="code" href="../../dd/df1/rt__interface__lcm_8cpp.html#a88fa377ae01a8f76015305fd22a4d3f0">main_control_settings</a>.rpy_des[2] = ((float)ch2 - 1000) * .001f;</div><div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;</div><div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;        <a class="code" href="../../dd/df1/rt__interface__lcm_8cpp.html#a88fa377ae01a8f76015305fd22a4d3f0">main_control_settings</a>.p_des[0] = 0;</div><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;        <a class="code" href="../../dd/df1/rt__interface__lcm_8cpp.html#a88fa377ae01a8f76015305fd22a4d3f0">main_control_settings</a>.p_des[1] = 0;</div><div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;        <a class="code" href="../../dd/df1/rt__interface__lcm_8cpp.html#a88fa377ae01a8f76015305fd22a4d3f0">main_control_settings</a>.p_des[2] = 0.21 + ((float)ch1 - 1000) * .0001f;</div><div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;      }</div><div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;      <span class="comment">// For all other gaits, control the velocities</span></div><div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;      <span class="keywordflow">else</span> {</div><div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;        <a class="code" href="../../dd/df1/rt__interface__lcm_8cpp.html#a88fa377ae01a8f76015305fd22a4d3f0">main_control_settings</a>.v_des[0] = v_scale * ((float)ch1 - 1000) * .002f;</div><div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;        <a class="code" href="../../dd/df1/rt__interface__lcm_8cpp.html#a88fa377ae01a8f76015305fd22a4d3f0">main_control_settings</a>.v_des[1] =</div><div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;            -v_scale * ((float)ch4 - 1000) * .0005f;</div><div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;        <a class="code" href="../../dd/df1/rt__interface__lcm_8cpp.html#a88fa377ae01a8f76015305fd22a4d3f0">main_control_settings</a>.v_des[2] = 0;</div><div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;        <a class="code" href="../../dd/df1/rt__interface__lcm_8cpp.html#a88fa377ae01a8f76015305fd22a4d3f0">main_control_settings</a>.p_des[2] = 0.21;</div><div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;</div><div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;        <a class="code" href="../../dd/df1/rt__interface__lcm_8cpp.html#a88fa377ae01a8f76015305fd22a4d3f0">main_control_settings</a>.omega_des[0] = 0;</div><div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;        <a class="code" href="../../dd/df1/rt__interface__lcm_8cpp.html#a88fa377ae01a8f76015305fd22a4d3f0">main_control_settings</a>.omega_des[1] = 0;</div><div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;        <a class="code" href="../../dd/df1/rt__interface__lcm_8cpp.html#a88fa377ae01a8f76015305fd22a4d3f0">main_control_settings</a>.omega_des[2] =</div><div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;            -v_scale * ((float)ch2 - 1000) * .003f;</div><div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;      }</div><div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;    }</div><div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;    <span class="comment">// For standing modes (mpc or balance qp) control orientations</span></div><div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;    <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="../../dd/df1/rt__interface__lcm_8cpp.html#a88fa377ae01a8f76015305fd22a4d3f0">main_control_settings</a>.mode == 10 ||</div><div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;             <a class="code" href="../../dd/df1/rt__interface__lcm_8cpp.html#a88fa377ae01a8f76015305fd22a4d3f0">main_control_settings</a>.mode == 3) {</div><div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;      <a class="code" href="../../dd/df1/rt__interface__lcm_8cpp.html#a88fa377ae01a8f76015305fd22a4d3f0">main_control_settings</a>.rpy_des[0] = ((float)ch4 - 1000) * .0003f;</div><div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;      <a class="code" href="../../dd/df1/rt__interface__lcm_8cpp.html#a88fa377ae01a8f76015305fd22a4d3f0">main_control_settings</a>.rpy_des[1] = ((float)ch3 - 1000) * .0005f;</div><div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;      <a class="code" href="../../dd/df1/rt__interface__lcm_8cpp.html#a88fa377ae01a8f76015305fd22a4d3f0">main_control_settings</a>.rpy_des[2] = ((float)ch2 - 1000) * .001f;</div><div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;</div><div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;      <a class="code" href="../../dd/df1/rt__interface__lcm_8cpp.html#a88fa377ae01a8f76015305fd22a4d3f0">main_control_settings</a>.p_des[0] = 0;</div><div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;      <a class="code" href="../../dd/df1/rt__interface__lcm_8cpp.html#a88fa377ae01a8f76015305fd22a4d3f0">main_control_settings</a>.p_des[1] = 0;</div><div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;      <a class="code" href="../../dd/df1/rt__interface__lcm_8cpp.html#a88fa377ae01a8f76015305fd22a4d3f0">main_control_settings</a>.p_des[2] = 0.21 + ((float)ch1 - 1000) * .0001f;</div><div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;    }</div><div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;  }</div><div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;  <span class="comment">// Use the joysticks for orientation and height control in standing mode</span></div><div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;</div><div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;  pthread_mutex_unlock(&amp;<a class="code" href="../../dd/df1/rt__interface__lcm_8cpp.html#a8303863c7983ff8c60f23de0d0265d51">lcm_get_set_mutex</a>);</div><div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;  <span class="comment">// printf(&quot;[RT Interface LCM] Got SBUS Packet\n&quot;);</span></div><div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;}</div><div class="ttc" id="rt__sbus_8h_html_a556abff30497289e33d971c6069c455c"><div class="ttname"><a href="../../d1/d95/rt__sbus_8h.html#a556abff30497289e33d971c6069c455c">read_sbus_channel</a></div><div class="ttdeci">int read_sbus_channel(int channel)</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/dad/rt__sbus_8cpp_source.html#l00101">rt_sbus.cpp:101</a></div></div>
<div class="ttc" id="rt__interface__lcm_8cpp_html_a8303863c7983ff8c60f23de0d0265d51"><div class="ttname"><a href="../../dd/df1/rt__interface__lcm_8cpp.html#a8303863c7983ff8c60f23de0d0265d51">lcm_get_set_mutex</a></div><div class="ttdeci">static pthread_mutex_t lcm_get_set_mutex</div><div class="ttdef"><b>Definition:</b> <a href="../../dd/df1/rt__interface__lcm_8cpp_source.html#l00008">rt_interface_lcm.cpp:8</a></div></div>
<div class="ttc" id="rt__interface__lcm_8cpp_html_a88fa377ae01a8f76015305fd22a4d3f0"><div class="ttname"><a href="../../dd/df1/rt__interface__lcm_8cpp.html#a88fa377ae01a8f76015305fd22a4d3f0">main_control_settings</a></div><div class="ttdeci">gui_main_control_settings_t main_control_settings</div><div class="ttdef"><b>Definition:</b> <a href="../../dd/df1/rt__interface__lcm_8cpp_source.html#l00030">rt_interface_lcm.cpp:30</a></div></div>
<div class="ttc" id="test__casadi_8cpp_html_ae20d7fba59865a21504b65cdb44cbfe5"><div class="ttname"><a href="../../dc/dd7/test__casadi_8cpp.html#ae20d7fba59865a21504b65cdb44cbfe5">f</a></div><div class="ttdeci">MX f(const MX &amp;x, const MX &amp;u)</div><div class="ttdef"><b>Definition:</b> <a href="../../dc/dd7/test__casadi_8cpp_source.html#l00202">test_casadi.cpp:202</a></div></div>
</div><!-- fragment -->
<p><div id="dynsection-5" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-5-trigger" src="../../closed.png" alt="+"/> Here is the call graph for this function:</div>
<div id="dynsection-5-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-5-content" class="dyncontent" style="display:none;">
<div class="center"><img src="../../d4/dd2/rt__interface__lcm_8h_a3f348fdbac738fe554e4543dee262081_cgraph.png" border="0" usemap="#d4/dd2/rt__interface__lcm_8h_a3f348fdbac738fe554e4543dee262081_cgraph" alt=""/></div>
<map name="d4/dd2/rt__interface__lcm_8h_a3f348fdbac738fe554e4543dee262081_cgraph" id="d4/dd2/rt__interface__lcm_8h_a3f348fdbac738fe554e4543dee262081_cgraph">
</map>
</div>
</p>

<p><div id="dynsection-6" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-6-trigger" src="../../closed.png" alt="+"/> Here is the caller graph for this function:</div>
<div id="dynsection-6-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-6-content" class="dyncontent" style="display:none;">
<div class="center"><img src="../../d4/dd2/rt__interface__lcm_8h_a3f348fdbac738fe554e4543dee262081_icgraph.png" border="0" usemap="#d4/dd2/rt__interface__lcm_8h_a3f348fdbac738fe554e4543dee262081_icgraph" alt=""/></div>
<map name="d4/dd2/rt__interface__lcm_8h_a3f348fdbac738fe554e4543dee262081_icgraph" id="d4/dd2/rt__interface__lcm_8h_a3f348fdbac738fe554e4543dee262081_icgraph">
</map>
</div>
</p>

</div>
</div>
<a class="anchor" id="aa5f4c06b7720f635aed7bf1462fa4465"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void* v_memcpy </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>dest</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">volatile void *&#160;</td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>n</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="../../dd/df1/rt__interface__lcm_8cpp_source.html#l00191">191</a> of file <a class="el" href="../../dd/df1/rt__interface__lcm_8cpp_source.html">rt_interface_lcm.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;                                                         {</div><div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;  <span class="keywordtype">void</span> *src_2 = (<span class="keywordtype">void</span> *)src;</div><div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;  <span class="keywordflow">return</span> memcpy(dest, src_2, n);</div><div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;}</div></div><!-- fragment -->
<p><div id="dynsection-7" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-7-trigger" src="../../closed.png" alt="+"/> Here is the caller graph for this function:</div>
<div id="dynsection-7-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-7-content" class="dyncontent" style="display:none;">
<div class="center"><img src="../../d4/dd2/rt__interface__lcm_8h_aa5f4c06b7720f635aed7bf1462fa4465_icgraph.png" border="0" usemap="#d4/dd2/rt__interface__lcm_8h_aa5f4c06b7720f635aed7bf1462fa4465_icgraph" alt=""/></div>
<map name="d4/dd2/rt__interface__lcm_8h_aa5f4c06b7720f635aed7bf1462fa4465_icgraph" id="d4/dd2/rt__interface__lcm_8h_aa5f4c06b7720f635aed7bf1462fa4465_icgraph">
</map>
</div>
</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="../../dir_43e0a1f539e00dcfa1a6bc4d4fee4fc2.html">home</a></li><li class="navelem"><a class="el" href="../../dir_61bfb0b3cdda81b1b0355ba34eb3b1eb.html">dhkim</a></li><li class="navelem"><a class="el" href="../../dir_adee5b101e079090017bb4e91c628ead.html">Public_Repository</a></li><li class="navelem"><a class="el" href="../../dir_7fc07a7b97001e7b1d18e11da761e2de.html">Cheetah-Software</a></li><li class="navelem"><a class="el" href="../../dir_e69772fee2c25f3f3a3da98250dcdda2.html">robot</a></li><li class="navelem"><a class="el" href="../../dir_20818e807e73f5841d8cf65b57c69c9c.html">include</a></li><li class="navelem"><a class="el" href="../../dir_6844cdb0195786a1ce825e66a22893fa.html">rt</a></li><li class="navelem"><a class="el" href="../../d4/dd2/rt__interface__lcm_8h.html">rt_interface_lcm.h</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
